

import axios from 'axios'

const instance = axios.create({
    baseURL: "https://cnodejs.org/api/v1",
    timeout: 5000
})

instance.interceptors.request.use((config) => {
    return config
}, (error) => {
    return new Promise.reject(error)
})

instance.interceptors.response.use((config) => {
    return config.data
}, (error) => {
    return new Promise.reject(error)
})

export default instance